package com.sakura.oj.model.dto.solution;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

/**
 * 创建题解请求
 *
 * @author sakura
 */
@Data
public class SolutionAddRequest implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 题目id
     */
    @NotEmpty(message = "题目id不能为空")
    private Long problemId;

    /**
     * 标题
     */
    @NotBlank(message = "标题不能为空")
    @Size(min = 6, max = 36, message = "标题长度在6到36位之间")
    private String title;

    /**
     * 内容
     */
    @NotBlank(message = "题解内容不能为空")
    private String content;

    /**
     * 标签列表
     */
    private List<Long> tags;
}